from sqlmodel import SQLModel,Field

# Shared properties
class UserBase(SQLModel):
    mobile: str = Field(unique=True, index=True, max_length=32)
    isLocked: int = Field(default=0)
    isSuper: int = Field(default=0)
    nickname: str = Field(default="", max_length=128)
    avatarUrl: str = Field(default="", max_length=255)
    inviteCode: str = Field(default="", max_length=10)

class UserPublic(UserBase):
    uid: int = Field(default=0)

class UserCreate(UserBase):
    status: int = Field(default=0)
